﻿@using System.Threading
@using Pottery.Frontend.Resources
@using Softserve.Pottery.Infrastructure

@{
    if (Thread.CurrentThread.CurrentUICulture.Name.Equals(Constants.RU))
    {
        <a href="@Url.Action("ChangeLanguage", "Home", new { language = Constants.EN,
                                                             controllerName = Url.RequestContext.RouteData.Values["controller"],
                                                             actionName = Url.RequestContext.RouteData.Values["action"] })">
            <img src= "@Url.Content("~/Content/images/ru.png")" alt="@_Language.English" />
        </a>
    }
    else
    {
        <a href="@Url.Action("ChangeLanguage", "Home", new { language = Constants.RU,
                                                             controllerName = Url.RequestContext.RouteData.Values["controller"],
                                                             actionName = Url.RequestContext.RouteData.Values["action"] })">
            <img src="@Url.Content("~/Content/images/en.png")" alt="@_Language.Russian" />   
        </a>
    }
}